package com.erp.order.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.core.web.oldDomain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 商户子订单业务对象 erp_store_child_order
 *
 * @author erp
 * @date 2023-03-28
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ErpSellerChildOrderBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 订单ID
     */
    @NotNull(message = "订单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderId;

    /**
     * 子订单ID
     */
    @NotBlank(message = "子订单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String childOrderId;

    /**
     * 产品单位
     */
    @NotBlank(message = "产品单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productUnit;

    /**
     * 发货类型
     */
    @NotBlank(message = "发货类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sendGoodsOperator;

    /**
     * SKU信息
     */
    @NotBlank(message = "SKU信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String skuCode;

    /**
     * 快照ID
     */
    @NotBlank(message = "快照ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private String snapshotId;

    /**
     * 产品快照的图片路径
     */
    @NotBlank(message = "产品快照的图片路径不能为空", groups = { AddGroup.class, EditGroup.class })
    private String snapshotSmallPhotoPath;

    /**
     * 商品主图Url
     */
    @NotBlank(message = "商品主图Url不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productImgUrl;

    /**
     * 快照Url
     */
    @NotBlank(message = "快照Url不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productSnapUrl;

    /**
     * 备货时间
     */
    @NotNull(message = "备货时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long goodsPrepareTime;

    /**
     * 物流服务
     */
    @NotBlank(message = "物流服务不能为空", groups = { AddGroup.class, EditGroup.class })
    private String logisticsServiceName;

    /**
     * 买家备注(子订单级别)
     */
    @NotBlank(message = "买家备注(子订单级别)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String buyerMemo;

    /**
     * cainiaoInternationalWarehouse表示是菜鸟认证海外仓发货的，这类订单（子订单）将由菜鸟系统下发海外仓系统，进行订单履行，商家ERP需进行过滤此类型的订单（子订单）。其他情况为空
     */
    @NotBlank(message = "cainiaoInternationalWarehouse表示是菜鸟认证海外仓发货的，这类订单（子订单）将由菜鸟系统下发海外仓系统，进行订单履行，商家ERP需进行过滤此类型的订单（子订单）。其他情况为空不能为空", groups = { AddGroup.class, EditGroup.class })
    private String logisticsWarehouseType;

    /**
     * 子订单中的各种标
     */
    @NotBlank(message = "子订单中的各种标不能为空", groups = { AddGroup.class, EditGroup.class })
    private String tags;

    /**
     * U_TAXED海外仓已税，跨境已税是I_TAXED
     */
    @NotBlank(message = "U_TAXED海外仓已税，跨境已税是I_TAXED不能为空", groups = { AddGroup.class, EditGroup.class })
    private String alreadyTaxed;

    /**
     * 存储子订单的拓展参数，是一个map 序列化成Json的
     */
    @NotBlank(message = "存储子订单的拓展参数，是一个map 序列化成Json的不能为空", groups = { AddGroup.class, EditGroup.class })
    private String extendMap;

    /**
     * 联盟佣金比例
     */
    @NotBlank(message = "联盟佣金比例不能为空", groups = { AddGroup.class, EditGroup.class })
    private String afflicateFeeRate;

    /**
     * 纠纷类型
     */
    @NotBlank(message = "纠纷类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String issueModel;

    /**
     * 纠纷状态;处理中 processing、 纠纷取消canceled_issue、纠纷完结,退款处理完成finish
     */
    @NotBlank(message = "纠纷状态;处理中 processing、 纠纷取消canceled_issue、纠纷完结,退款处理完成finish不能为空", groups = { AddGroup.class, EditGroup.class })
    private String issueStatus;

    /**
     * 纠纷创建时间
     */
    @NotBlank(message = "纠纷创建时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private String issueTime;

    /**
     * 交易佣金比例
     */
    @NotBlank(message = "交易佣金比例不能为空", groups = { AddGroup.class, EditGroup.class })
    private String escrowFeeRate;

    /**
     * 冻结状态
     */
    @NotBlank(message = "冻结状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String frozenStatus;

    /**
     * 资金状态
     */
    @NotBlank(message = "资金状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fundStatus;

    /**
     * 金额（mount=cent/cant_factor）
     */
    @NotBlank(message = "金额（mount=cent/cant_factor）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String initOrderAmount;

    /**
     * 最小货币单位（例如人民币：分）
     */
    @NotNull(message = "最小货币单位（例如人民币：分）不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal initOrderCent;

    /**
     * 到最小货币单元的乘积因子（例如人民币：100）
     */
    @NotNull(message = "到最小货币单元的乘积因子（例如人民币：100）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long initOrderCentFactor;

    /**
     * 货币描述ID，对应AE_CURRENCY_DESCRIPTION
     */
    @NotNull(message = "货币描述ID，对应AE_CURRENCY_DESCRIPTION不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long initOrderCurrencyDescriptionId;

    /**
     * 币种
     */
    @NotBlank(message = "币种不能为空", groups = { AddGroup.class, EditGroup.class })
    private String initOrderCurrencyCode;

    /**
     * 金额（mount=cent/cant_factor）
     */
    @NotBlank(message = "金额（mount=cent/cant_factor）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String loanAmount;

    /**
     * 最小货币单位（例如人民币：分）
     */
    @NotNull(message = "最小货币单位（例如人民币：分）不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal loanCent;

    /**
     * 到最小货币单元的乘积因子（例如人民币：100）
     */
    @NotNull(message = "到最小货币单元的乘积因子（例如人民币：100）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long loanCentFactor;

    /**
     * 货币描述ID，对应AE_CURRENCY_DESCRIPTION
     */
    @NotNull(message = "货币描述ID，对应AE_CURRENCY_DESCRIPTION不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long loanCurrencyDescriptionId;

    /**
     * 币种
     */
    @NotBlank(message = "币种不能为空", groups = { AddGroup.class, EditGroup.class })
    private String loanCurrencyCode;

    /**
     * 放款时间 (此时间为美国太平洋时间）
     */
    @NotBlank(message = "放款时间 (此时间为美国太平洋时间）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String loanTime;

    /**
     * 放款金额（mount=cent/cant_factor）
     */
    @NotBlank(message = "放款金额（mount=cent/cant_factor）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String logisticsAmount;

    /**
     * 最小货币单位（例如人民币：分）
     */
    @NotNull(message = "最小货币单位（例如人民币：分）不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal logisticsCent;

    /**
     * 到最小货币单元的乘积因子（例如人民币：100）
     */
    @NotNull(message = "到最小货币单元的乘积因子（例如人民币：100）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long logisticsCentFactor;

    /**
     * 货币描述ID，对应AE_CURRENCY_DESCRIPTION
     */
    @NotNull(message = "货币描述ID，对应AE_CURRENCY_DESCRIPTION不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long logisticsDescriptionId;

    /**
     * 币种
     */
    @NotBlank(message = "币种不能为空", groups = { AddGroup.class, EditGroup.class })
    private String logisticsCurrencyCode;

    /**
     * 物流类型，买家选择的物流方式
     */
    @NotBlank(message = "物流类型，买家选择的物流方式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String logisticsType;

    /**
     * 每个piece或lot对应多少个产品
     */
    @NotNull(message = "每个piece或lot对应多少个产品不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long lotNum;

    /**
     * 子订单序号，用于子订单发货，即sub_trade_order_index
     */
    @NotBlank(message = "子订单序号，用于子订单发货，即sub_trade_order_index不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderSortId;

    /**
     * 订单状态
     */
    @NotBlank(message = "订单状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderStatus;

    /**
     * 商品扩展属性，skuid等
     */
    @NotBlank(message = "商品扩展属性，skuid等不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productAttributes;

    /**
     * 商品数量
     */
    @NotNull(message = "商品数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productCount;

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productName;

    /**
     * 商品单价金额（mount=cent/cant_factor）
     */
    @NotBlank(message = "商品单价金额（mount=cent/cant_factor）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productPrice;

    /**
     * 最小货币单位（例如人民币：分）
     */
    @NotNull(message = "最小货币单位（例如人民币：分）不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal productCent;

    /**
     * 到最小货币单元的乘积因子（例如人民币：100）
     */
    @NotNull(message = "到最小货币单元的乘积因子（例如人民币：100）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productCentFactor;

    /**
     * 货币描述ID，对应AE_CURRENCY_DESCRIPTION
     */
    @NotNull(message = "货币描述ID，对应AE_CURRENCY_DESCRIPTION不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productDescriptionId;

    /**
     * 币种
     */
    @NotBlank(message = "币种不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productCurrencyCode;

    /**
     * 乐观锁
     */
    @NotBlank(message = "乐观锁不能为空", groups = { AddGroup.class, EditGroup.class })
    private String revision;


}
